Skip to content

feat(libkernel): serve the console CA list from the host trust store - #5144

Closed
MarcZX10 wants to merge 1 commit into
boykopovar:mainfrom
MarcZX10:codex/sandbox-ca-list-5001
Closed

MarcZX10 wants to merge 1 commit into
boykopovar:mainfrom
MarcZX10:codex/sandbox-ca-list-5001

Conversation

@MarcZX10

@MarcZX10 MarcZX10 commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

What

Carries screamm’s independently authored commit for host-provided /<sandbox word>/common/cert/CA_LIST.cer, preserving the original commit author. The path provider lazily creates a read-only bundle from the Windows ROOT/CA stores or Linux SSL_CERT_FILE/standard distro bundle paths. If no certificates are available, opening the file fails with ENOENT.

Overlap: #5280 carries the same original commit and is the broader implementation, adding Windows trust filtering, resolver precedence tests and Windows title evidence. This PR is retained as the minimal carry, but should be reviewed/merged only if maintainers want this narrower implementation; it is functionally superseded by #5280. The two PRs add the same provider and certificate tests and should not both be merged.

Tested

The carried implementation was reported tested on Windows 11 with MinGW-w64 GCC 15.2.0 and on Ubuntu 24.04 with GCC 13.3. On Windows, guest_sandbox_certificates and filesystem tests passed; the reported non-AGC suite had one known patched_libraries failure and one guest_raise_exception timeout. On Linux, guest_sandbox_certificates passed 20/20 and all 335 guest_* tests passed twice. No title run was reported for this PR. Current rebased source files pass MinGW GCC 12 syntax-only checks; conventions pass. Full current-head Windows/Linux test execution is not claimed.

AI-assisted: yes.

Checklist

@github-actions

github-actions Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
#4994 core/libs/prx/libc/src/General.cpp L120-121
#5091 core/libs/prx/libkernel/File/src/SandboxCertificates.cpp
core/libs/tests/GuestSandboxCertificates.cpp
#5280 core/libs/prx/libc/src/General.cpp L41, L120-122, L305
core/libs/prx/libkernel/CMakeLists.txt L16, L80, L272
core/libs/prx/libkernel/File/src/SandboxCertificates.cpp
core/libs/tests/GuestSandboxCertificates.cpp
docs/dev/debt/libkernel.md L119
core/libs/prx/libkernel/File/src/SandboxCertificates.cpp
core/libs/tests/GuestSandboxCertificates.cpp

Titles that bundle OpenSSL load the console's CA file from the sandbox
directory and fail every HTTPS request without it. ProsperoRadio
(PPSA99001, libcurl 8.18.0 + OpenSSL 3.5.2) on main + boykopovar#4796 + boykopovar#4525:

  [ProsperoRadio][http] https://all.api.radio-browser.info/json/servers: Problem with the SSL CA cert (path? access rights?) (error adding trust anchors from file: /gkbHtXc3Wq/common/cert/CA_LIST.cer)

SwanStation (PPSA98510) stops on the same file (boykopovar#5001).

The guest path resolver now accepts exact-path providers, and libkernel
registers one for /<sceKernelGetFsSandboxRandomWord()>/common/cert/CA_LIST.cer.
On first use it writes a PEM bundle once per process to
cert_cache/CA_LIST.cer in the run directory, read-only: on Windows the
current user's ROOT and CA system stores, elsewhere SSL_CERT_FILE or the
first distro bundle that exists. Without a certificate the path keeps
resolving under the guest root and does not exist, as before. Every other
path under the sandbox word is unchanged. The console file's format and
the rest of its common/cert directory are unverified and recorded in
docs/dev/debt/libkernel.md.

With this change, boykopovar#4796, boykopovar#4525 and boykopovar#5025 on Windows 11, 60 s each:

  [ProsperoRadio][http] 11846160 bytes in 1458 ms: 1161 passes, 803 waits (679 woken) for 1428 ms
  [ProsperoRadio][catalog] page offset=0 bytes=11846160 objects=10000 accepted=9549 total=9549
  ...
  [ProsperoRadio][catalog] page offset=60000 bytes=1712035 objects=1494 accepted=1436 total=59371

  [SwanStationPS5] update: latest 1.2.5, this 1.1.3, available
  [SwanStationPS5] gamedb: index written

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@MarcZX10
MarcZX10 force-pushed the codex/sandbox-ca-list-5001 branch from c47b0a2 to bb5eea6 Compare October 13, 2026 19:08
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 13, 2026
@oneandonlydean

Copy link
Copy Markdown
Collaborator

Closing: no title is known to reach this. With the queue at 700+ open PRs, please hold off on new PRs that don't name a title needing the change until it's down. If a title stops on this on current main, reopen with the title ID and the log line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants